package com.osfw.activiti.domain;

import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 流程任务信息
 */
@Data
@Accessors(chain = true)
public class ProcessTaskInfo {

    /* 任务ID */
    private Long taskId;

    /* 流程实例ID */
    private Long instanceId;

    /** 事项名称 */
    private String itemName;

    /** 申请人 */
    private String applyUser;

    /** 申请时间 */
    private String applyTime;

    /** 业务表主键 */
    private String businessKey;

    /** 任务名称 */
    private String taskName;

    /** 节点名称 */
    private String nodeName;

    /** 是否查看 default 0 (0 否 1 是) */
    private Integer isView;

    /** 是否处理 default 0 (0 否 1 是) */
    private Integer isHandle;

    /** 待办人 ID */
    private Long todoUserId;

    /** 待办人名称 */
    private String todoUserName;

    /** 处理人 ID */
    private Long handleUserId;

    /** 处理人名称 */
    private String handleUserName;

    /** 通知时间 */
    private Date todoTime;

    /** 处理时间 */
    private Date handleTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("taskId", getTaskId())
                .append("itemName", getItemName())
                .append("taskName", getTaskName())
                .append("instanceId", getInstanceId())
                .append("businessKey", getBusinessKey())
                .append("applyUser", getApplyUser())
                .append("applyTime", getApplyTime())
                .append("isView", getIsView())
                .append("isHandle", getIsHandle())
                .append("todoUserId", getTodoUserId())
                .append("todoUserName", getTodoUserName())
                .append("handleUserId", getHandleUserId())
                .append("handleUserName", getHandleUserName())
                .append("todoTime", getTodoTime())
                .append("handleTime", getHandleTime())
                .toString();
    }

}
